package com.yykj.tencent.im.server.bean.message;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.yykj.tencent.im.client.message.MsgType;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;


/**
 * 表情消息元素
 *
 */
@Data
@NoArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
public class TIMFaceMsgElement extends TIMMsgElement {
    @JsonProperty("MsgContent")
    private FaceMsgContent msgContent;


    public TIMFaceMsgElement(FaceMsgContent msgContent) {
        super(MsgType.TIM_FACE_ELEM);
        this.msgContent = msgContent;
    }

    public TIMFaceMsgElement(Integer index, String data) {
        this(new FaceMsgContent(index, data));
    }


    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public static class FaceMsgContent {
        @JsonProperty("Index")
        private Integer index;

        @JsonProperty("Data")
        private String data;
    }
}
